POV-Ray : Newsgroups : povray.text.scene-files : Smooth edges on sphere and cube? : Re: Smooth edges on sphere and cube? Server Time
28 Jul 2024 18:17:45 EDT (-0400)
  Re: Smooth edges on sphere and cube?  
From: Chris Huff
Date: 28 Jul 2000 18:32:42
Message: <chrishuff-0DF8FA.17332828072000@news.povray.org>
In article <39818D7D.17AD6F52@accn.org>, rob### [at] accnorg wrote:

> Anyone know how to easily make rounded smooth edges on cubes and
> cylinders? 

One way to do this is with the superellipsoid object, as has been 
mentioned. However, this method doesn't give you as good control over 
the radius of the curve, and all the faces will be slightly curved and 
not perfectly flat.

The usual method to get a true rounded box or cylinder is to use a CSG 
union or merge or to use a macro which produces such a CSG. A rounded 
box consists of 8 spheres, 12 cylinders, and 3 boxes. A rounded cylinder 
consists of 2 cylinders and 2 torii, or you can just cap the ends of a 
single cylinder with spheres. The locations for these are easy to figure 
out for boxes and cylinders. The math for rounded cones is a bit more 
complex, but still fairly simple if you know a little trigonometry.
If you use a union, and your objects are not transparent, it is slightly 
faster...if you want to use transparent objects, you should usually use 
merge to remove the internal surfaces.

There should be macros to do what you want here:
http://www.erols.com/vansickl/macs.htm

PS: I don't think you can get smooth edges on a sphere... :-)

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.